package com.wedo.mall.entity;

import java.util.List;

/**
 * 多SKU信息
 * Created by e on 2017/7/11.
 *
 * 你选择商品属性（attrNameInfo下数据）的时候，拿属性值去goodsOn里面匹配（skuid【字符串】或skuArr【数组】）
 * skuid跟skuArr下保存的是属性值id，两者是一样的，就是类型不一样，skuid用的-符号拼接id
 *
 */

public class GoodsOn {

    /**
     * id : 86706
     * goods_number : 100
     * goods_price : 103.00
     * goods_image : /Static/Uploads/Goods_pic/2017-05-04/800x800/590b091bafe08_800x800.jpg
     * goods_name : 怡宝饮水机
     * attr_list : ,1,2,6,9,12,18,25,5,8,
     * surplus : 100
     * skuid : 5-8
     * skuArr : ["5","8"]
     */

    public String id;
    public String goods_number;
    public String goods_price;
    public String goods_image;
    public String goods_name;
    public String attr_list;
    public int surplus;
    public String skuid;
    public List<String> skuArr;

    public String favorable_price;
    /**1表示优惠商品*/
    public int is_favorable;

    public String price(){
        if (is_favorable == 1){
            return favorable_price;
        }
        return goods_price;
    }
}
